<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绿能智链 - 用户钱包/资产</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #f8faf9;
            color: #333;
            min-height: 100vh;
        }

        .app-header {
            background: linear-gradient(135deg, #1a8754, #0d6e3d);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .asset-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
        }
        .asset-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.12);
        }
        .tab-bar {
            background-color: white;
            border-top: 1px solid #e5e7eb;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        }
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 8px 0;
            color: #6b7280;
        }
        .tab-item.active {
            color: #10b981;
        }
        .content-area {
            height: calc(100vh - 60px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        .earnings-card {
            background: linear-gradient(135deg, #10b981, #059669);
            border-radius: 16px;
            color: white;
        }
        .action-button {
            background-color: #f3f4f6;
            border-radius: 12px;
            transition: all 0.3s ease;
        }
        .action-button:hover {
            background-color: #e5e7eb;
        }
        .asset-progress {
            height: 6px;
            background-color: #e5e7eb;
            border-radius: 3px;
            overflow: hidden;
        }
        .asset-progress-bar {
            height: 100%;
            background-color: #10b981;
            border-radius: 3px;
        }
    </style>
</head>
<body class="flex flex-col h-full">


    <!-- 应用头部 -->
    <header class="app-header p-4 text-white relative">
        <div class="flex justify-between items-center">
            <h1 class="text-xl font-bold">我的资产</h1>
            <div class="flex space-x-4">
                <button>
                    <i class="fas fa-bell"></i>
                </button>
                <button>
                    <i class="fas fa-cog"></i>
                </button>
            </div>
        </div>
    </header>

    <!-- 主内容区域 -->
    <div class="content-area flex-1 p-4 relative">
        <!-- 收益看板 -->
        <section class="mb-6">
            <div class="earnings-card p-4">
                <div class="flex justify-between items-center mb-3">
                    <h2 class="text-lg font-semibold">总资产价值</h2>
                    <button class="bg-white bg-opacity-20 rounded-full px-3 py-1 text-xs">
                        <i class="fas fa-sync-alt mr-1"></i> 刷新
                    </button>
                </div>
                <div class="text-3xl font-bold mb-2">2.45 ETH</div>
                <div class="text-white text-opacity-80 text-sm">≈ ¥28,560.00</div>
                <div class="grid grid-cols-2 gap-4 mt-4">
                    <div>
                        <div class="text-white text-opacity-80 text-sm mb-1">累计收益</div>
                        <div class="text-xl font-semibold">0.85 ETH</div>
                    </div>
                    <div>
                        <div class="text-white text-opacity-80 text-sm mb-1">可提取金额</div>
                        <div class="text-xl font-semibold">0.12 ETH</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- 操作按钮 -->
        <section class="mb-6">
            <div class="grid grid-cols-3 gap-3">
                <button class="action-button p-3 flex flex-col items-center">
                    <div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center mb-2">
                        <i class="fas fa-exchange-alt text-green-600"></i>
                    </div>
                    <span class="text-sm">转让NFT</span>
                </button>
                <button class="action-button p-3 flex flex-col items-center">
                    <div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mb-2">
                        <i class="fas fa-bolt text-blue-600"></i>
                    </div>
                    <span class="text-sm">兑换电力</span>
                </button>
                <button class="action-button p-3 flex flex-col items-center">
                    <div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center mb-2">
                        <i class="fas fa-lock text-purple-600"></i>
                    </div>
                    <span class="text-sm">质押NFT</span>
                </button>
            </div>
        </section>

        <!-- NFT资产列表 -->
        <section class="mb-6">
            <div class="flex justify-between items-center mb-3">
                <h2 class="text-lg font-semibold">我的电力NFT</h2>
                <button class="text-green-600 text-sm">
                    查看全部
                </button>
            </div>
            <div class="space-y-4">
                <!-- NFT资产1 -->
                <div class="asset-card">
                    <div class="flex p-4">
                        <div class="w-20 h-20 rounded-lg overflow-hidden mr-3 flex-shrink-0">
                            <img src="https://images.unsplash.com/photo-1466611653911-95081537e5b7?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="风力发电站" class="w-full h-full object-cover">
                        </div>
                        <div class="flex-1">
                            <div class="flex justify-between items-start">
                                <div>
                                    <h3 class="font-semibold">青海湖风力发电站</h3>
                                    <p class="text-sm text-gray-600">购买日期: 2023-09-15</p>
                                </div>
                                <div class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">
                                    运行中
                                </div>
                            </div>
                            <div class="mt-2">
                                <div class="flex justify-between items-center text-sm mb-1">
                                    <span class="text-gray-600">已使用电量</span>
                                    <span>250 / 1000 kWh</span>
                                </div>
                                <div class="asset-progress">
                                    <div class="asset-progress-bar" style="width: 25%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="flex border-t border-gray-100">
                        <button class="flex-1 py-3 text-center text-green-600 font-medium border-r border-gray-100">
                            <i class="fas fa-chart-line mr-1"></i> 查看收益
                        </button>
                        <a href="exchange.html" class="flex-1 py-3 text-center text-gray-600 font-medium">
                            <i class="fas fa-bolt mr-1"></i> 兑换电力
                        </a>
                    </div>
                </div>

                <!-- NFT资产2 -->
                <div class="asset-card">
                    <div class="flex p-4">
                        <div class="w-20 h-20 rounded-lg overflow-hidden mr-3 flex-shrink-0">
                            <img src="https://images.unsplash.com/photo-1532601224476-15c79f2f7a51?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="风力发电站" class="w-full h-full object-cover">
                        </div>
                        <div class="flex-1">
                            <div class="flex justify-between items-start">
                                <div>
                                    <h3 class="font-semibold">张北坝上风力发电站</h3>
                                    <p class="text-sm text-gray-600">购买日期: 2023-08-22</p>
                                </div>
                                <div class="bg-green-100 text-green-800 px-2 py-1 rounded-full text-xs">
                                    运行中
                                </div>
                            </div>
                            <div class="mt-2">
                                <div class="flex justify-between items-center text-sm mb-1">
                                    <span class="text-gray-600">已使用电量</span>
                                    <span>600 / 800 kWh</span>
                                </div>
                                <div class="asset-progress">
                                    <div class="asset-progress-bar" style="width: 75%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="flex border-t border-gray-100">
                        <button class="flex-1 py-3 text-center text-green-600 font-medium border-r border-gray-100">
                            <i class="fas fa-chart-line mr-1"></i> 查看收益
                        </button>
                        <a href="exchange.html" class="flex-1 py-3 text-center text-gray-600 font-medium">
                            <i class="fas fa-bolt mr-1"></i> 兑换电力
                        </a>
                    </div>
                </div>
            </div>
        </section>

        <!-- 碳积分余额 -->
        <section class="mb-6">
            <div class="flex justify-between items-center mb-3">
                <h2 class="text-lg font-semibold">碳积分余额</h2>
                <button class="text-green-600 text-sm">
                    积分明细
                </button>
            </div>
            <div class="bg-white rounded-lg p-4 shadow-sm">
                <div class="flex justify-between items-center">
                    <div>
                        <div class="text-2xl font-bold">1,250</div>
                        <div class="text-sm text-gray-600 mt-1">本月新增: +320</div>
                    </div>
                    <button class="bg-green-600 text-white px-4 py-2 rounded-lg text-sm font-medium">
                        兑换奖励
                    </button>
                </div>
                <div class="mt-4 pt-4 border-t border-gray-100">
                    <div class="text-sm text-gray-600 mb-2">碳减排贡献</div>
                    <div class="flex items-center">
                        <div class="flex-1 h-2 bg-gray-200 rounded-full overflow-hidden">
                            <div class="h-full bg-green-500 rounded-full" style="width: 65%"></div>
                        </div>
                        <span class="ml-3 text-sm font-medium">650kg</span>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- 底部Tab栏 -->
    <div class="tab-bar h-16 flex justify-around items-center">
        <a href="home.html" class="tab-item">
            <i class="fas fa-home text-xl"></i>
            <span class="text-xs mt-1">首页</span>
        </a>
        <a href="nft_detail.html" class="tab-item">
            <i class="fas fa-store text-xl"></i>
            <span class="text-xs mt-1">市场</span>
        </a>
        <a href="wallet.html" class="tab-item active">
            <i class="fas fa-solar-panel text-xl"></i>
            <span class="text-xs mt-1">我的资产</span>
        </a>
        <a href="exchange.html" class="tab-item">
            <i class="fas fa-exchange-alt text-xl"></i>
            <span class="text-xs mt-1">兑换</span>
        </a>
    </div>
</body>
</html>